<?php ?>
<div id="gallery_space" >
<?php 

	// sometimes this gets set twice. need to grab first instance
	if(is_array($content_id)){
		$content_id = $content_id[ 0 ];
	}
	$hidden = array(
		'refurl' => $refurl,
		'content_editor_type' => $section_type,
		'content_id' => $content_id,
		'catId' => $catId,
		'title' => $galleryTitle
	);
	$attr = array(
	 'id' => 'gallery_selector'
	);
	echo form_open("$action/$id/",$attr,$hidden);
	?>
<div class="grid_2 alignright margin_top20" >Gallery Title</div>
<div class="grid_3 nicebutton" >
<input type="text" size="40" class="niceform" id="title" name="title" <?php if( getError( $errors,'title') )echo 'class="error"';?> value="<?php echo set_value('title',$galleryTitle); ?>"/> 
</div>
<div class="grid_4 alignright margin_top20" >Default thumb size</div>
<div class="grid_3 nicebutton" >
<?php 
	if(empty($defaultThumbsize)){
		$defaultThumbsize = '90';
	}
	$options = array(
                  '40'  => 'Small',
                  '90'    => 'Medium',
                  '150'   => 'Large',
                  '250' => 'Extra Large',
                );
	$additional = 'class="niceform"';
	echo form_dropdown('defaultThumbsize', $options, $defaultThumbsize,$additional);
	?>
</div>
<?php 
if( !empty( $headerTxt ) ){
	echo $headerTxt;
}
if( !empty( $imgs ) ){
	echo $imgs;
}
?>
<input type="hidden" id="refurl" name="refurl" value="<?php  echo !empty($refurl)?$refurl:"";?>"> 
</form>
</div>